import request from '@/utils/request'

// 查询仓库分类列表
export function listWarehouseDept(query) {
  return request({
    url: '/warehouseDept/warehouseDept/list',
    method: 'get',
    params: query
  })
}

// 查询仓库分类详细
export function getWarehouseDept(warehouseDeptId) {
  return request({
    url: '/warehouseDept/warehouseDept/' + warehouseDeptId,
    method: 'get'
  })
}

// 新增仓库分类
export function addWarehouseDept(data) {
  return request({
    url: '/warehouseDept/warehouseDept',
    method: 'post',
    data: data
  })
}

// 修改仓库分类
export function updateWarehouseDept(data) {
  return request({
    url: '/warehouseDept/warehouseDept',
    method: 'put',
    data: data
  })
}

// 删除仓库分类
export function delWarehouseDept(warehouseDeptId) {
  return request({
    url: '/warehouseDept/warehouseDept/' + warehouseDeptId,
    method: 'delete'
  })
}
// 查询仓库下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/warehouseDept/warehouseDept/deptTree',
    method: 'get'
  })
}
